#pragma once

#include <iostream>
#include <string>

using namespace std;

class LoginWay
{
public:
	string password;

	string getPassword()
	{
		return password;
	}
	void setPsaaword(string password)
	{
		this->password = password;
	}
	virtual string getLoginOrNum() = 0;
};

class UserAndPassword : public LoginWay
{
public:
	string userName;
	UserAndPassword(string userName,string password) {
		this->userName = userName;
		this->password = password;
	}

	string getUserName() {
		return userName;
	}
	void setUserName() {
		this->userName = userName;
	}
	string getLoginOrNum() {
		return this->userName;
	}
};

class PhoneAndPassword : public LoginWay
{
public:
	string PhoneNum;
	PhoneAndPassword(string PhoneNum, string password) {
		this->PhoneNum = PhoneNum;
		this->password = password;
	}

	string getPhoneNum() {
		return PhoneNum;
	}
	void setPhoneNum() {
		this->PhoneNum = PhoneNum;
	}
	string getLoginOrNum() {
		return this->PhoneNum;
	}
};